﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Demo.Model
{

    /// <summary>
    /// AdventureWorks数据库中Person.Address表的一个实体。
    /// </summary>
    [Serializable]
    public class Address : Cocon90.Lib.Dal.Rule.IModel
    {
        public string TableName { get { return "Person.Address"; } }
        public Address()
        { }
        #region Model
        private int? _addressid;
        private string _addressline1;
        private string _addressline2;
        private string _city;
        private int? _stateprovinceid;
        private string _postalcode;
        private Guid? _rowguid;
        private DateTime? _modifieddate = DateTime.Now;

        //public string MyCustomProp { get { return AddressID+"|"+AddressLine1;} }

        /// <summary>
        /// Primary key for Address records.
        /// </summary>
        public int? AddressID
        {
            set { _addressid = value; }
            get { return _addressid; }
        }
        /// <summary>
        /// First street address line.
        /// </summary>
        public string AddressLine1
        {
            set { _addressline1 = value; }
            get { return _addressline1; }
        }
        /// <summary>
        /// Second street address line.
        /// </summary>
        public string AddressLine2
        {
            set { _addressline2 = value; }
            get { return _addressline2; }
        }
        /// <summary>
        /// Name of the city.
        /// </summary>
        public string City
        {
            set { _city = value; }
            get { return _city; }
        }
        /// <summary>
        /// Unique identification number for the state or province. Foreign key to StateProvince table.
        /// </summary>
        public int? StateProvinceID
        {
            set { _stateprovinceid = value; }
            get { return _stateprovinceid; }
        }
        /// <summary>
        /// Postal code for the street address.
        /// </summary>
        public string PostalCode
        {
            set { _postalcode = value; }
            get { return _postalcode; }
        }
        /// <summary>
        /// ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample.
        /// </summary>
        public Guid? rowguid
        {
            set { _rowguid = value; }
            get { return _rowguid; }
        }
        /// <summary>
        /// Date and time the record was last updated.
        /// </summary>
        public DateTime? ModifiedDate
        {
            set { _modifieddate = value; }
            get { return _modifieddate; }
        }
        #endregion Model

    }

}
